<%@page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.hz.util.ParamUtil"%>
<%@page import="com.hz.model.Activity"%>
<%@page import="com.hz.control.ActivityControl"%>
<%@page import="com.hz.control.ActTypeControl"%>
<%@page import="com.hz.model.ActType"%>
<%@page import="com.hz.model.ParamDepartment"%>
<%@page import="com.hz.control.ParamDepartmentManager"%>
<%@page import="com.hz.model.User"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../css/active.css"/>
<title>Insert title here</title>
</head>
<body>
<%
      request.setCharacterEncoding("utf-8");
      User cu = (User)session.getAttribute("user");
      int actid = ParamUtil.getInt(request,"actid",0);
      System.out.print("AAAA"+actid);
      Activity a = ActivityControl.getActivityInformation(actid);
 %>
<form>
<h2 class='title'>活动详情<a href='javascript:window.history.go(-1)'>返回列表</a></h2>
<div class='article'>
<h3 class='h3'><%=a.getActName() %><br/><span class='time'><%=a.getStartTime()%>~<%=a.getEndTime() %></span></h3>
<p><span class="detial">活动简介：</span>本次活动属于<%=ActTypeControl.getActTypeName(a.getActType()) %>类活动，由<%if(a.getDepartmentId()==0){out.print("红烛协会");}else{out.print(ParamDepartmentManager.findDepartment(a.getDepartmentId()).getDepartmentName() );}%>承办，
在<%=a.getPlace() %>举行，由<%=a.getLeader() %>负责，共<%=a.getPeopleNum() %>人参与，花费<%=a.getCost() %>,用了<%=a.getResource() %>等资源。
</p>
<p class='p'><%=a.getContent() %></p>
<span class="detial">花费明细：</span>
 <br><%=a.getCostDetail() %><br/>
  <%
      if(cu!=null&&cu.getRole()==1){//加个cu!=null可以防止没有登录时转到此页面报空指针错
      %>
      <p class="del"><a  href="../../admin/addActivity/activity_update.jsp?acid=<%=a.getId() %>">修改</a> <a>|</a>
      <a href="../../admin/addActivity/activity_delete.jsp?acid=<%=a.getId() %>">删除</a></p>
      <%
      }
   %>
</div>
</form>
</body>
</html>